package com.wlcorp.forcazamis.business.baseinfo.impl;

import java.util.List;

import com.wlcorp.forcazamis.business.baseinfo.ISampleSourceService;
import com.wlcorp.forcazamis.dao.baseinfo.ISampleSourceDAO;
import com.wlcorp.forcazamis.domain.baseinfo.SampleSource;
import com.wlcorp.forcazamis.exception.ServiceException;
import com.wlcorp.forcazamis.sys.BaseService;

public class SampleSourceServiceImpl extends BaseService implements
		ISampleSourceService {
	
	private ISampleSourceDAO sampleSourceDAO;
	public List<SampleSource> getSampleSourceList(SampleSource sampleSource)
			throws ServiceException {
		return sampleSourceDAO.getSampleSourceList(sampleSource);
	}

	public SampleSource getSampleSourceById(Long sampleSourceId)
			throws ServiceException {
		if(null == sampleSourceId){
			return null;
		}
		return sampleSourceDAO.getSampleSourceById(sampleSourceId);
	}

	public void saveSampleSource(SampleSource sampleSource)
			throws ServiceException {
		sampleSourceDAO.saveSampleSource(sampleSource);
	}

	public void setSampleSourceDAO(ISampleSourceDAO sampleSourceDAO) {
		this.sampleSourceDAO = sampleSourceDAO;
	}

	public void deleteSampleSource(SampleSource sampleSource)
			throws ServiceException {
		sampleSourceDAO.deleteSampleSource(sampleSource);
	}
	
}
